<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script src="../js/jquery-2.0.0.js" ></script>
<script type="text/javascript" src="../js/layer/layer.js"></script>
<script>
	$(document).ready(function (){
		//新增主题是否成功
		var add_flag = '${add_flag}';
		if(add_flag!="" && add_flag=="true"){
			layer.alert('新增主题成功',{
				icon:1
			});
		}else if(add_flag!="" && add_flag=="false"){
			layer.alert('新增主题失败',{
				icon:0
			});
		}
		
		
	});

	function check(){
		var flag = true;
		var topicName = $("#topicName").val();
		if(topicName == null || topicName == ""){
			flag = false;
			layer.alert('请输入主题名',{
				icon:0
			});
		}
		return flag;
	}
</script>
</head>

<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">主题管理</a></li>
    <li><a href="#">新增主题</a></li>
    </ul>
    </div>
    
    <div class="formbody">
    
    <div class="formtitle"><span>基本信息</span></div>
    <form action="TopicAction_updateTopic.action" method="post" onsubmit="return check()">
    <ul class="forminfo">
    <input type="hidden" name="id" value="${request.topic.id }" />
    <li><label>主题名</label><input id="topicName" name="topicName" type="text" class="dfinput" value="${request.topic.topicName }"/><i>主题名不能超过30个字符</i></li>
    <li><label>主题描述</label><textarea name="describe" cols="" rows="" class="textinput">${request.topic.describe }</textarea></li>
    <li><label>&nbsp;</label><input type="submit" class="btn" value="确认保存" /></li>
    </ul>
    </form>
    
    </div>


</body>

</html>
